package ucd.smarthome.databaseinterface;

import java.util.ArrayList;

import com.google.gson.Gson;

public class Appliance {
	
	private String ApplianceName;
	private String ApplianceId;
	private String ApplianceDescription;
	private int status;
	private ArrayList<ApplianceMethod> methods;
	
	
	

	public Appliance(String applianceName, String applianceId,
			String applianceDescription, int status,
			ArrayList<ApplianceMethod> methods) {
		super();
		ApplianceName = applianceName;
		ApplianceId = applianceId;
		ApplianceDescription = applianceDescription;
		this.status = status;
		this.methods = methods;
	}
	public String getApplianceName() {
		return ApplianceName;
	}
	public void setApplianceName(String applianceName) {
		ApplianceName = applianceName;
	}
	public String getApplianceId() {
		return ApplianceId;
	}
	public void setApplianceId(String applianceId) {
		ApplianceId = applianceId;
	}
	public String getApplianceDescription() {
		return ApplianceDescription;
	}
	public void setApplianceDescription(String applianceDescription) {
		ApplianceDescription = applianceDescription;
	}
	public int getStatus() {
		return status;
	}
	public void setStatus(int status) {
		this.status = status;
	}
	
	
	public ArrayList<ApplianceMethod> getMethods() {
		return methods;
	}

	
	
	
	
	public void setMethods(ArrayList<ApplianceMethod> methods) {
		this.methods = methods;
	}
	
	
	public static void main(String[] args) {
		ApplianceMethod method=new ApplianceMethod("123", null, null, "test");
		ApplianceMethod method2=new ApplianceMethod("234", null, null, "test2");
		ArrayList<ApplianceMethod> methods=new ArrayList<ApplianceMethod>();
		methods.add(method);
		methods.add(method2);
		Appliance app=new Appliance("test", "MAC01", "test", 1, methods);
		Gson gson = new Gson();
		String test = gson.toJson(app);
		System.out.println(test);
		
	}
	
	

}
